﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            //Cat c = new Cat();
            //c.Leg = 4;
            //c.Sleep();
            //c.walk();
            //c.seeInNight();
            //c.Cry();
            //c.CatchMouse();

            //Console.WriteLine("__________________________________________________________");
            //Console.WriteLine();

            //Tiger t = new Tiger();
            //t.Leg = 4;
            //t.Sleep();
            //t.walk();
            //t.seeInNight();
            //t.Cry();

            //Console.WriteLine("__________________________________________________________");
            //Console.WriteLine();

            //Eagle e = new Eagle();
            //e.Leg = 2;
            //e.Sleep();
            //e.walk();
            //e.Fly();
            //e.Cry();

            //Console.WriteLine("__________________________________________________________");
            //Console.WriteLine();

            //Swallow s = new Swallow();
            //s.Leg = 2;
            //s.Sleep();
            //s.walk();
            //s.Fly();
            //s.Cry();


            //PetStore ps = new PetStore();
            //Cat tom = new Cat();
            //ps.ConsignCat(tom);

            //Console.WriteLine("------------------------------");

            //Tiger wds1hao = new Tiger();
            //ps.ConsignTiger(wds1hao);

            //Console.WriteLine("------------------------------");
            //Swallow s = new Swallow();
            //ps.ConsignSwallow(s);

            //Console.WriteLine("------------------------------");

            //Animal a = new Swallow();
            //a.Cry();

            Console.WriteLine("欢迎来到xx宠物店，请问你要寄存什么动物呢：1、猫；2、燕子；3、老鹰；4、老虎");
            int key = int.Parse(Console.ReadLine());
            Animal a;
            switch (key)
            {
                case 1:
                    a = new Cat();
                    break;
                case 2:
                    a = new Swallow();
                    break;
                case 3:
                    a = new Eagle();
                    break;
                case 4:
                    a = new Tiger();
                    break;
                default:
                    Console.WriteLine("你别乱选。");
                    a = new Tiger();
                    break;
            }

            PetStore ps = new PetStore();
            ps.ConsignAnimal(a);
        }


    } 
    }

